<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    function abc(a){
      console.log(a)
      var a = 'a';
      console.log(a)
      function a(){
        console.log('fun a');
      }
    }
    /**
     * 注意观察Scope中的Local对象
     * 
    */
    abc(1);

    // 函数是一等公民，会提升到最前面, 然后才是var变量提升
    // function abc(a){
    //   function a(){
    //     console.log('fun a');
    //   }
    //   console.log(a)
    //   var a = 'a';
    //   console.log(a)
    // }

    
    function bcd(a){
      function a(){
        console.log('fun a');
      }
      /*
      * var a = f a() {...}
      */
      console.log(a)
      var a = a;
      console.log(a)
    }
    //bcd(123)
  </script>
</body>
</html>